<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="layui/css/layui.css" tppabs="http://res.layui.com/layui/dist/css/layui.css"  media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>

<script src="layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->

<body>

<form class="layui-form" action="/repair/add">
    <div class="layui-form-item">
        <label class="layui-form-label"> 维修名称</label>
        <div class="layui-input-block">
            <input type="text" name="repairName" required  lay-verify="required" placeholder="维修名称" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">位置</label>
        <div class="layui-input-block">
            <input type="text" name="place" required  lay-verify="required" placeholder="请输入位置" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">提示</label>
        <div class="layui-input-block">
            <input type="text" name="tips" required  lay-verify="required" placeholder="请输入提示" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>

<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;
        console.log(form);

        //监听提交
        form.on('submit(formDemo)', function(data){
            /*layer.msg(JSON.stringify(data.field));*/
            return true;//true：才会走action
        });
    });
</script>

</body>

<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

        // //开始日期
        // laydate.render({
        //     elem: '#entry_time'
        // });
    });
</script>

</html>